package com.cn.demo.mapper;

import com.cn.demo.entity.Student;
import com.cn.demo.entity.StudentExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface StudentMapper {
    long countByExample(StudentExample example);

    int deleteByExample(StudentExample example);

    int deleteByPrimaryKey(String studentId);

    int insert(Student record);

    int insertSelective(Student record);

    List<Student> selectByExample(StudentExample example);

    Student selectByPrimaryKey(String studentId);

    int updateByExampleSelective(@Param("record") Student record, @Param("example") StudentExample example);

    int updateByExample(@Param("record") Student record, @Param("example") StudentExample example);

    int updateByPrimaryKeySelective(Student record);

    int updateByPrimaryKey(Student record);

    List<Student> get(Student student);

    Student getByStudentId(String studentId);

    int update(Student student);

    int delete(String[] studentIdList);

    Student checkInfo(String studentId, String oldPassword);

    int updatePassword(String studentId, String affirmPassword);

    Student login(Student student);

    int updateToken(@Param("token")String token, @Param("studentId")String studentId);
}